package org.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.example.springboot.common.entity.BaseEntity;

/**
 * 灌溉单元基本信息
 *
 * @author Fz
 * @since 1.0.0 2024-07-30
 */
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("irrigation_unit")
public class IrrigationUnit extends BaseEntity {

    /**
     * 单元编号
     */
    @Column(name = "unit_code", comment = "单元编号")
    private String unitCode;

    /**
     * 控制设备名称
     */
    @Column(name = "control_device", comment = "控制设备名称")
    private String controlDevice;

    /**
     * 控制设备ID
     */
    @Column(name = "control_device_id", comment = "控制设备ID")
    private String controlDeviceId;

    /**
     * 单元面积
     */
    @Column(name = "area", comment = "单元面积", type = MySqlTypeConstant.FLOAT, decimalLength = 2)
    private Float area;

    @Column(name = "unit", comment = "单元 01 亩  02平方", type = MySqlTypeConstant.VARCHAR, defaultValue = "02")
    private String unit;

    /**
     * 轮灌编号
     */
    @Column(name = "sym", comment = "轮灌编号")
    private String sym;

    /**
     * 作物名称
     */
    @Column(name = "title", comment = "作物名称")
    private String title;

    /**
     * 灌溉方式 0 定量灌溉 1 周日灌溉 2 水分控制灌溉  3 ET决策灌溉
     */
    @Column(name = "type", comment = "灌溉方式 0 定量灌溉 1 周期灌溉 2 水分控制灌溉  3 ET决策灌溉")
    private String type;

    /**
     * 土壤水分
     */
    @Column(name = "soil_moisture", comment = "土壤水分")
    private String soilMoisture;

    /**
     * 剩余流量
     */
    /*@Column(name = "flow_remaining", comment = "剩余流量")
    private String flowRemaining;*/

    /**
     * 蒸散发量
     */
   /* @Column(name = "evapotranspiration", comment = "蒸散发量")
    private String evapotranspiration;*/

    /**
     * 剩余流量
     */
    @Column(name = "time_remaining", comment = "剩余时间")
    private String timeRemaining;

    /**
     * 灌溉状态
     */
    @Column(name = "status", comment = "1启动 0停止", type = MySqlTypeConstant.VARCHAR, defaultValue = "0")
    private String status;


}